#include "UdpSocket.hpp"

class UdpClient
{
public:
    UdpClient(const std::string& serip,uint16_t serport)
    :sock_("-1",-1) ,serip_(serip),serport_(serport)
    {
        
    }
    ~UdpClient()
    {
        
    }
    bool RecvFrom(std::string* buf){
        return sock_.RecvFrom(buf);
    }
    bool SendTo(const std::string& buf){
        return sock_.SendTo(buf,serip_,serport_);
    }
private:
    UdpSocket sock_;
    std::string serip_;
    uint16_t serport_;
};